BasisGenerator finish output on function call#150
Conversation
…eSnapshot is called.
|
Is it still possible to write both the snapshot and basis files? I see the need for this. In But I also see in that example that |
|
@jtlau Thanks for watching this PR. I was planning to ask whether this PR might break something, as it makes it impossible to call |
|
@dylan-copeland what is the status of this PR? |
It turned out that the basis generators are more complex than I first anticipated, since they support time intervals, where new intervals are made when the maximum number of samples is taken in an interval. Because of this, I did not have time or motivation yet to come up with a plan. Maybe we should consider removing the interval feature, if no one ever uses it, and it only causes unnecessary complications. |
I cast my vote to remove the interval feature. I do not think we use it anywhere. |
I agree. We should remove that feature first in a separate PR, and then revisit this PR, which will be greatly simplified. |
|
@dylan-copeland The plan is to remove interval concept in basis generator and then come back to this PR again. |
|
This work is addressed by #261. |
Before this PR,
BasisGeneratordoes not finish writing out basis or snapshot files, whenendSamplesorwriteSnapshotis called. The files are fully written only whenBasisGeneratoris deleted or goes out of scope, as the writer has to be deleted. This PR deletes the writer whenendSamplesorwriteSnapshotis called, so that the files are finished. This prevents confusion and bugs, and the only disadvantage is thatendSamplesorwriteSnapshotcannot be called twice.